<html>
<body>
<!-- The stuff. Inspect files in same order as they are enumerated here. -->
<script type="KbtJSX" src="coreutil.kbtjsx"></script>
<script type="KbtJSX" src="const.kbtjsx"></script>
<script type="KbtJSX" src="coordinator.kbtjsx"></script>
<script type="KbtJSX" src="graphutil.kbtjsx"></script>
<script type="KbtJSX" src="resutil.kbtjsx"></script>
<script type="KbtJSX" src="guicore.kbtjsx"></script>
<script type="KbtJSX" src="basicwidgets.kbtjsx"></script>
<script type="KbtJSX" src="tweeners.kbtjsx"></script>
<script type="KbtJSX" src="screenman.kbtjsx"></script>
<script type="KbtJSX" src="popupman.kbtjsx"></script>
<script type="KbtJSX" src="sprite.kbtjsx"></script>
<!-- application specific stuff goes here -->
<script type="KbtJSX" src="resources.kbtjsx"></script>
<script type="KbtJSX" src="animations.kbtjsx"></script>
<script type="KbtJSX" src="morewidgets.kbtjsx"></script>
<script type="KbtJSX" src="popupgen.kbtjsx"></script>
<script type="KbtJSX" src="popups.kbtjsx"></script>
<script type="KbtJSX" src="scr_mainmenu.kbtjsx"></script>
<script type="KbtJSX" src="gamelogic.kbtjsx"></script>
<script type="KbtJSX" src="scr_game.kbtjsx"></script>
<script type="KbtJSX" src="main.kbtjsx"></script>

<script type="application/javascript;version=1.7" src="kbt.js"></script>
<script type="application/javascript;version=1.7">
function Test17 () { let a = 1; yield "yes, this browser supports js 1.7"; }
var appCanvas,appGC;
document.write ("<canvas width=480 height=640 id=appCanvas></canvas>"+
"<div id=appOffscreenPool style='visibility: hidden; position: absolute; left: 0; top: 0'></div>"+
"<div id=appLog></div>");
var
	appCanvas = document.getElementById ('appCanvas'),
	appGC = appCanvas.getContext ('2d'),
	appLog = document.getElementById ('appLog'),
	appOffscreenPool = document.getElementById ('appOffscreenPool');

appLog.writef = function (fmt,data)
{
	if (data==undefined)
		appLog.innerHTML += fmt;
	else
		appLog.innerHTML += Kbt.format (fmt,data);
};

var cp1 = new Date ().getTime ();
Kbt.parseScripts ();
var cp2 = new Date ().getTime ();
appLog.writef ("Loaded in "+(cp2-cp1)+" ms<br>\n");

try {
	// run our everything
	mainInstance = new main ();
	appEQ.processEvents ();
	// ...and now it goes on its own
}
catch (e)
{
	appLog.writef ("<hr>Fuckup detected<hr>\n");
	if (e.elements)
	for (var x in e.elements ()) appLog.writef (x+"<br>\n");
	else appLog.writef (e.message);
}
</script>

<script>
// check the outcome of our version check
if (typeof (appGC)=="undefined")
{
	document.write ("<img src=img/alas.jpg><br>\n"+
	"This application requires browser that supports JS 1.7+ and HTML 5.<br>\n"
	+"The only browser currently capable of these both is <a href=http://www.mozilla.org/ru/firefox>Firefox</a>.");
}
</script>
</body>
</html>